import json
dict_1 = {
    "username": "小明",
    "age": 12,
    "grade": "计算机应用"
}

list1 = ['小明', 12, "计算机应用"]

json_type = json.dumps(dict_1, ensure_ascii=False, indent=2)
print("json格式\n", json_type)
json_type2 = json.dumps(dict_1, ensure_ascii=False, indent=2)
print("json格式2\n", json_type)
